//
//  DYAppReq.h
//  HelpYouReturn
//
//  Created by 帝云科技 on 2017/11/22.
//  Copyright © 2017年 diyunkeji. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HNNetworking.h"
#import <UIKit/UIKit.h>

#define DYAPPENDING(str) [DYAppReq appending:str]
#define DYAPPREQSUCCESS [responseObject[@"code"] integerValue] == 1

typedef void(^DYAppReqBlock)(id responseObject, NSError *error);

@interface DYAppReq : NSObject


#pragma mark - 调用
/**
 get请求
 */
+ (void)GET:(NSString *)urlString param:(NSDictionary *)param callBack:(DYAppReqBlock)block;

/**
 post请求
 */
+ (void)POST:(NSString *)urlString param:(NSDictionary *)param callBack:(DYAppReqBlock)block;

/**
 图片上传-单张
 */
+ (void)dy_upload:(NSString *)urlString
             name:(NSString *)name
            image:(UIImage *)image
            param:(NSDictionary *)param
         callBack:(DYAppReqBlock)block;

/**
 地址拼接
 */
+ (NSString *)appending:(NSString *)urlString;


@end
